﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Absence.aspx.cs" Inherits="Corsat.Web.Absence" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .progressBackgroundFilter
        {
            position: fixed;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            overflow: hidden;
            padding: 0;
            margin-left: auto;
            margin-right: auto;
            background-color: #000;
            filter: alpha(opacity=50);
            opacity: 0.5;
            z-index: 1000;
        }
        
        .processMessage
        {
            margin-left: auto;
            margin-right: auto;
            position: fixed;
            top: 30%;
            left: 43%;
            padding: 10px;
            width: 14%;
            z-index: 1001;
            background-color: #fff;
            border: solid 1px #000;
            text-align: center;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="formScriptManager" runat="server">
    </asp:ScriptManager>
    <div>
        <asp:Panel ID="pnlChooseCourse" runat="server" GroupingText="إختيار كورس" Font-Bold="False"
            Font-Size="Large" Direction="RightToLeft">
            <asp:UpdateProgress ID="UpdateProgress2" runat="server">
                <ProgressTemplate>
                    <div class="progressBackgroundFilter">
                    </div>
                    <div class="processMessage">
                        جارى التحميل...<br />
                        <br />
                        <img alt="Loading..." src="Images/Loading.gif" />
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
            <table width="100%" dir="rtl">
                <tr>
                    <td colspan="4" align="center">
                        <asp:Label ID="lblWarning" runat="server" Style="font-size: large; color: Red; font-weight: bold;"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 10%; text-align: left;">
                        <asp:Label ID="lblCourseName" runat="server" Text="الإسم"></asp:Label>
                    </td>
                    <td style="width: 40%">
                        <asp:DropDownList ID="ddlCourseNames" runat="server" Width="100%" OnSelectedIndexChanged="ddlCourseNames_SelectedIndexChanged"
                            AutoPostBack="true" Style="font-size: large; margin-right: 0px">
                        </asp:DropDownList>
                    </td>
                    <td style="width: 40%">
                        <asp:UpdatePanel ID="upCourseLevels" runat="server">
                            <ContentTemplate>
                                <asp:Panel ID="pnlCourseLevels" runat="server" GroupingText="المستوى">
                                    <asp:RadioButtonList ID="rdoLevel" runat="server" RepeatLayout="Flow" RepeatDirection="Vertical"
                                        OnSelectedIndexChanged="rdoLevel_SelectedIndexChanged" AutoPostBack="true">
                                    </asp:RadioButtonList>
                                </asp:Panel>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="ddlCourseNames" EventName="SelectedIndexChanged" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                    <td style="width: 10%">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnlAbsence" runat="server" GroupingText="غياب الكورس" Font-Bold="False"
            Font-Size="Large" Direction="RightToLeft">
            <table>
                <tr>
                    <td>
                        <asp:UpdatePanel ID="pnlAbsenceGrid" runat="server">
                            <ContentTemplate>
                                <asp:GridView ID="gvAbsence" runat="server" EnableModelValidation="True" AutoGenerateColumns="False">
                                    <Columns>
                                        <%--<asp:BoundField DataField="AccountId" Visible="False" />--%>
                                        <asp:BoundField DataField="AccountSerialInCourse" HeaderText="الرقم في الكورس" />
                                        <asp:TemplateField HeaderText="Account ID" Visible="false">
                                            <ItemTemplate>
                                                <asp:Label ID="lblAccountId" runat="server" Text='<%# Eval("AccountId") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="ArabicName" HeaderText="الاسم" />
                                        <asp:BoundField DataField="CorsatId" HeaderText="الرقم الكورساتي" />
                                        <asp:TemplateField HeaderText="اليوم الأول">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="Att_1" runat="server" Checked='<%# Eval("Att_1") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="اليوم الثاني">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="Att_2" runat="server" Checked='<%# Eval("Att_2") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="اليوم الثالث">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="Att_3" runat="server" Checked='<%# Eval("Att_3") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="اليوم الرابع">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="Att_4" runat="server" Checked='<%# Eval("Att_4") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="اليوم الخامس">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="Att_5" runat="server" Checked='<%# Eval("Att_5") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="اليوم السادس">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="Att_6" runat="server" Checked='<%# Eval("Att_6") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="اليوم السابع">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="Att_7" runat="server" Checked='<%# Eval("Att_7") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="rdoLevel" EventName="SelectedIndexChanged" />
                                <asp:AsyncPostBackTrigger ControlID="ddlCourseNames" EventName="SelectedIndexChanged" />
                                <asp:AsyncPostBackTrigger ControlID="btnUpdateAbsence" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:Button ID="btnUpdateAbsence" runat="server" Text="حفظ" OnClick="btnUpdateAbsence_Click" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"></asp:ObjectDataSource>
    </form>
</body>
</html>
